package com.example.lol.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.lol.R;
import com.example.lol.bean.CommendArticleBean;

import org.jetbrains.annotations.NotNull;

import java.util.List;

public class CommendArticleAdapter extends BaseQuickAdapter<CommendArticleBean, BaseViewHolder> {

    public CommendArticleAdapter() {
        super(R.layout.recommend_style);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, CommendArticleBean commendArticleBean) {
        baseViewHolder.setText(R.id.recommend_title,commendArticleBean.getTitle());
        baseViewHolder.setImageResource(R.id.recommend_part2_img1,commendArticleBean.getImg());
        baseViewHolder.setImageResource(R.id.recommend_part3_head,commendArticleBean.getHead());
        baseViewHolder.setText(R.id.recommend_name,commendArticleBean.getName());

    }
}
